screen | NN 4 IE 4 DOM n/a | ||||
The screen object refers to the video display on which the browser is being viewed. Many video control panel settings influence the property values. | |||||
Object Model Reference
|
availHeight, availWidth | NN 4 IE 4 DOM n/a | ||
Read-only | |||
Height and width of the content region of the user's video monitor in pixels. This measure does not include the 24-pixel taskbar (Windows 95/NT) or 20-pixel system menubar (Macintosh). IE 4/Macintosh miscalculates the height of the menubar as 24 pixels. To use these values in creating a maximized window, you also have to adjust the top-left position of the window. | |||
Examplevar newWind = window.open("","","HEIGHT=" + screen.availHeight + ",WIDTH=" + screen.availWidth) | |||
Value Integer of available pixels in vertical and horizontal dimensions. | |||
|
availLeft, availTop | NN 4 IE n/a DOM n/a | ||
Read-only | |||
Pixel coordinates of the left and top edges of the screen. Always zero, as far as I can tell. | |||
Value Integer. | |||
|
bufferDepth | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
Setting of the offscreen bitmap buffer. Path animation smoothness may improve on some clients if you match the bufferDepth to the colorDepth values. Setting the bufferDepth to -1 forces IE to buffer at the screen's pixel depth (as set in the control panel), and colorDepth is automatically set to that value, as well (plus if a user changes the bits per pixel, the buffer is adjusted accordingly). A setting to any of the other permitted values (1, 4, 8, 15, 16, 24, or 32) buffers at that pixel depth and sets the colorDepth to that value. The client's display must be set to the higher bits-per-pixel values to take advantage of the higher settings in scripts. | |||
Examplescreen.bufferDepth = 4 | |||
Value Any of the following allowed integers: -1 | 0 | 4 | 8 | 15 | 16 | 24 | 32. | |||
|
colorDepth | NN 4 IE 4 DOM n/a | ||
Read-only | |||
Returns the number of bits per pixel used to display color in the video monitor or image buffer. Although this property is read-only, its value can be influenced by settings of the bufferDepth property (IE only). You can determine the color depth of the current video screen and select colors accordingly. | |||
Exampleif (screen.colorDepth > 8) { document.all.pretty.color = "cornflowerblue" } else { document.all.pretty.color = "blue" } | |||
Value Integer. | |||
|
height, width | NN 4 IE 4 DOM n/a | ||
Read-only | |||
Returns the number of pixels available vertically and horizontally in the client video monitor. This is the raw dimension. For the amount of screen space not covered by system bars, see availHeight and availWidth. | |||
Exampleif (screen.height > 480 && screen.width > 640) { ... } | |||
Value Integer of pixel counts. | |||
|
pixelDepth | NN 4 IE n/a DOM n/a | ||
Read-only | |||
Returns the number of bits per pixel used to display color in the video monitor. This value is similar to the colorDepth property, but it is not influenced by a potential custom color palette, as colorDepth is. | |||
Exampleif (screen.pixelDepth > 8) { document.all.pretty.color = "cornflowerblue" } else { document.all.pretty.color = "blue" } | |||
Value Integer. | |||
|
updateInterval | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
The time interval (in milliseconds) between screen updates. A value of zero lets the browser select an average that usually works best. The longer the interval, the more animation steps may be buffered and then ignored as the update fires to display the current state. | |||
Examplescreen.updateInterval = 0 | |||
Value Positive integer or zero. | |||
|